package gecko.model;

import java.sql.*;

import com.mysql.jdbc.PreparedStatement;

public class Connect {
	
	  public Connection dbConnect(){
		  try 
		  {	
			    Class.forName("com.mysql.jdbc.Driver"); 
		  } catch(ClassNotFoundException cnfe)
		  {		  
			    System.out.println("Pb chargement du Driver : v�rifier classpath");
			    cnfe.printStackTrace();
		  }

//		String url = "jdbc:mysql://localhost:8889/mouhssin1u_contrat";
//		String login = "simon";
//		String pass = "msimon";
		
//		String url = "jdbc:mysql://localhost:8889/mouhssin1u_contrat";
//		String login = "clem9085";
//		String pass = "clem9085";
		
		  
		  //KARIMA//
		String url = "jdbc:mysql://localhost/mouhssin1u_contrat";
		String login = "simon";
		String pass = "msimon";

		Connection co = null;
			try 
			{
			    co = DriverManager.getConnection(url, login, pass);
			} 
			catch (SQLException sqle) 
			{
			    System.out.println("Erreur � la connexion : " + sqle.getMessage());
			} 
			return co;
	}

	public PreparedStatement prepareStatement(String reqUpdate) {
		// TODO Auto-generated method stub
		return null;
	}

}
		

